/*
 * give  a sample for abstract class
 * author: li jiguo
 * data:   20161205
 * email:  jiguo_li@outlook.com
*/
#include<iostream>

using namespace std;

class base
{
public:
	virtual void disp() = 0;
};

template<int _T_NUM_>
class animal:public base
{
public:
	void disp(){
		cout << _T_NUM_ << endl;
	};
	void plus(int i){
		cout << _T_NUM_ +i<< endl;
	}
};

int main(void)
{
	base * pbase = NULL;
	//for (int i = 0; i < 10; i++)
	{
		pbase = new animal < 1 > ;
		pbase->disp();
		delete pbase;

		pbase = new animal < 2 >;
		pbase->disp();
		delete pbase;

		pbase = new animal < 3 >;
		pbase->disp();
		delete pbase;

		pbase = new animal < 4 >;
		pbase->disp();
		delete pbase;

		pbase = new animal < 5 >;
		pbase->disp();
		delete pbase;
	}
	
	return 0;
}